package com.pj.project.aliyun_config;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.pj.project4sp.SP;
import com.pj.utils.sg.AjaxJson;
import com.pj.utils.so.SoMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * Controller: sys_client -- 应用表
 * @author shengzhang 
 */
@RestController
@RequestMapping("/aliyun/")
public class AliyunConfigController {

	/** 底层 Mapper 对象 */
	@Autowired
	AliyunConfigMapper aliyunConfigMapper;
	
	/** 改 */  
	@RequestMapping("update")
	@SaCheckPermission(AliyunConfig.PERMISSION_CODE)
	public AjaxJson update(AliyunConfig s){
		int line = aliyunConfigMapper.update(s);
		return AjaxJson.getByLine(line);
	}

	/** 查 - 根据id 
	 * @throws InterruptedException */  
	@RequestMapping("getById")
	@SaCheckPermission(AliyunConfig.PERMISSION_CODE)
	public AjaxJson getById(Long id) {
		AliyunConfig s = aliyunConfigMapper.getById(id);
		return AjaxJson.getSuccessData(s);
	}

}
